package cn.biplam.front.component.view.systemManage.sysprivi.privilege;

import cn.biplam.common.ajxcode.SystemCode.PriviDeployCode;
import cn.biplam.common.wrapper.ErrorMessage;
import cn.biplam.front.component.AjxResponse;
import cn.biplam.front.component.view.systemManage.sysprivi.privilege.deploy.PriviDeployMain;
import cn.biplam.front.component.view.systemManage.sysprivi.privilege.deploy.add.PriviDeployAdd;
import cn.biplam.front.component.view.systemManage.sysprivi.privilege.deploy.del.PriviDeployDel;
import cn.biplam.front.html.base.HtmlWindow;

/**
 *  权限发布管理
 * @author XiaoRuxing Dec 5, 20095:14:35 PM
 * @version 1.0
 */
public class PriviDeployManage  extends AjxResponse{

	/**  */
	public static final String cId=PriviDeployCode.cId;
	
	//权限发布主页面
	public static final String Privi_Deploy_Main = PriviDeployCode.Privi_Deploy_Main;
	//添加权限大类
	public static final String Privi_Deploy_Add = PriviDeployCode.Privi_Deploy_Add;
	//添加权限大类提交
	public static final String Privi_Deploy_Add_Submit = PriviDeployCode.Privi_Deploy_Add_Submit;
	//修改权限大类
	public static final String Privi_Deploy_Edit = PriviDeployCode.Privi_Deploy_Edit;
	//修改权限大类数据提交
	public static final String Privi_Deploy_Edit_Submit = PriviDeployCode.Privi_Deploy_Edit_Submit;
	//删除权限大类
	public static final String Privi_Deploy_Del = PriviDeployCode.Privi_Deploy_Del;
	//删除权限大类数据提交
	public static final String Privi_Deploy_Del_Submit = PriviDeployCode.Privi_Deploy_Del_Submit;
	
	@Override
	protected HtmlWindow ajxGet() throws ErrorMessage {
		if (this.actionId.equals(Privi_Deploy_Main)){//权限发布管理主页面
			return new PriviDeployMain(mUser,sHomeUrl,recordId,params).get();
		}else if (this.actionId.equals(Privi_Deploy_Add)){//添加权限大类界面
			return new PriviDeployAdd(mUser,sHomeUrl,recordId,params).addPanel();
		}else if (this.actionId.equals(Privi_Deploy_Add_Submit)){//添加权限大类数据提交
			return new PriviDeployAdd(mUser,sHomeUrl,recordId,params).add();
		}else if (this.actionId.equals(Privi_Deploy_Edit)){//修改权限大类界面
			return new PriviDeployAdd(mUser,sHomeUrl,recordId,params).editPanel();
		}else if (this.actionId.equals(Privi_Deploy_Edit_Submit)){//修改权限大类数据提交
			return new PriviDeployAdd(mUser,sHomeUrl,recordId,params).edit();
		}else if(this.actionId.equals(Privi_Deploy_Del)){//删除权限大类界面
			return new PriviDeployDel(mUser,sHomeUrl,recordId,params).delPanel();
		}else if(this.actionId.equals(Privi_Deploy_Del_Submit)){//删除数据提交
			return new PriviDeployDel(mUser,sHomeUrl,recordId,params).delSubmit();
		}else{
			throw new ErrorMessage("Ajx Exchange outport not found:" + actionId	+ " !");
		}
	}

}
